Remove deprecation warnings from demos and tests
authorMatthias Clasen <mclasen@redhat.com>
Sat, 25 Jan 2014 02:08:59 +0000 (21:08 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 25 Jan 2014 02:08:59 +0000 (21:08 -0500)
There were a few uses of gtk_widget_get_root_window that
need to be removed.

demos/gtk-demo/offscreen_window.c
demos/gtk-demo/offscreen_window2.c
tests/gtkoffscreenbox.c

index 7c141e13d9c46f2d0226f9134063ffe49d254b88..ee542b3041bde9d1e44cff27430766e4e5042f65 100644 (file)
@@ -279,7 +279,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
       attributes.width = child_allocation.width;
       attributes.height = child_allocation.height;
     }
-  bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
+  bin->offscreen_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
index fa67a595a2a37e0cf8b18bcfc272cb9a9f045c9b..b327f71052c6cc93e3ba5bf4c49e5b9ec58c4fca 100644 (file)
@@ -218,7 +218,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
       attributes.width = child_allocation.width;
       attributes.height = child_allocation.height;
     }
-  bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
+  bin->offscreen_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
index 7aeb82cdfd397931dfee78f0bb742c790b4b3e04..29140a1f4f45ef98f39c29495b4f7057444a7ca1 100644 (file)
@@ -305,7 +305,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.height = child_area.height;
       start_y += child_area.height;
     }
-  offscreen_box->offscreen_window1 = gdk_window_new (gtk_widget_get_root_window (widget),
+  offscreen_box->offscreen_window1 = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window1, widget);
   if (offscreen_box->child1)
@@ -329,7 +329,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.width = child_area.width;
       attributes.height = child_area.height;
     }
-  offscreen_box->offscreen_window2 = gdk_window_new (gtk_widget_get_root_window (widget),
+  offscreen_box->offscreen_window2 = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window2, widget);
   if (offscreen_box->child2)